# @Time: 2024/2/1 16:03
# @Autor: XS
# @File: run.py
# @Software: PyCharm

"""
/**
 * _ooOoo_
 * o8888888o
 * 88" . "88
 * (| -_- |)
 *  O\ = /O
 * ___/`---'\____
 * .   ' \\| |// `.
 * / \\||| : |||// \
 * / _||||| -:- |||||- \
 * | | \\\ - /// | |
 * | \_| ''\---/'' | |
 * \ .-\__ `-` ___/-. /
 * ___`. .' /--.--\ `. . __
 * ."" '< `.___\_<|>_/___.' >'"".
 * | | : `- \`.;`\ _ /`;.`/ - ` : | |
 * \ \ `-. \_ __\ /__ _/ .-` / /
 * ======`-.____`-.___\_____/___.-`____.-'======
 * `=---=' bug泛滥 佛已瘫痪
"""
import argparse
from test_for_rs import Test


def main():
    parser = argparse.ArgumentParser(description='测试建筑模型')
    parser.add_argument('model_path', type=str, help='模型权重文件路径')
    parser.add_argument('--img', type=str, help='测试图片路径')
    parser.add_argument('--output_dir', type=str, help='预测结果保存路径')

    args = parser.parse_args()
    model_path = args.model_path
    img_path = args.img
    output_dir = args.output_dir
    test = Test('建筑', models_info=model_path)
    test.detect_big_img(img_path, output_dir)


if __name__ == '__main__':
    main()
